package cn.otrue.patienthealthmanager.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import cn.otrue.patienthealthmanager.R;

public class MedicalRecord extends BaseActivity {
	private Button medicalrecord_add;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_center_medicalrecord);
		initView();
	}

	public void initView() {
		initTitleBar();
		medicalrecord_add = (Button) findViewById(R.id.medicalrecord_add);
		medicalrecord_add.setOnClickListener(this);
	}

	private void initTitleBar() {
		TextView tv_title_back = (TextView) findViewById(R.id.tv_title_back);
		TextView tv_title_title = (TextView) findViewById(R.id.tv_title_title);
		TextView tv_title_other = (TextView) findViewById(R.id.tv_title_other);
		tv_title_back.setVisibility(View.VISIBLE);
		tv_title_back.setOnClickListener(this);
		tv_title_title.setText(getString(R.string.datum_of_cases));
		tv_title_other.setVisibility(View.VISIBLE);
		tv_title_other.setText(getString(R.string.register));
		tv_title_other.setOnClickListener(this);

	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.tv_title_back:
			finish();
			break;
		case R.id.medicalrecord_add:
			Intent medicalrecordaddIntent = new Intent(MedicalRecord.this,
					MedicalRecordAdd.class);
			startActivity(medicalrecordaddIntent);
			break;
		default:
			break;
		}
	}

}
